package com.example.demo.api;

import com.example.demo.entity.TbUser;
import com.example.demo.service.TbUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Mark
 * @date 2020/5/30 18:36
 * @description 用户控制层
 */
@RestController
@RequestMapping("/api")
public class TbUserController {

    @Autowired
    private TbUserService userService;

    @GetMapping("/selectUserByUserNo/{userNo}")
    public TbUser selectByPrimaryKey(@PathVariable("userNo") String userNo) {
        return userService.selectByPrimaryKey(userNo);
    }

}
